package com.example.stock.service.impl;

import com.example.stock.excel.ExcelReaderUtil;
import com.example.stock.excel.Monitor;
import com.example.stock.service.MonitorService;
import com.example.stock.util.DataUtil;
import jakarta.annotation.PostConstruct;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;
import java.util.List;

@Log4j2
@Service
public class MonitorServiceImpl implements MonitorService {

    private List<Monitor> monitorList;

    @PostConstruct
    private void init() {
        monitorList = DataUtil.getListData(Monitor.class, ExcelReaderUtil.FILE_OPERATION, "监控");
    }

    @Override
    public List<Monitor> getAllMonitors() {
        return monitorList;
    }
}
